--- /dev/null
+<!DOCTYPE node PUBLIC
+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+<node>
+ <interface name="net.reactivated.Fprint.Device">
+ <method name="ListEnrolledFingers">
+ <arg type="s" name="username" direction="in">
+ </arg>
+ <arg type="as" name="enrolled_fingers" direction="out">
+ </arg>
+ </method>
+
+ <method name="DeleteEnrolledFingers">
+ <arg type="s" name="username" direction="in">
+ </arg>
+ </method>
+
+ <method name="DeleteEnrolledFingers2">
+ </method>
+
+ <method name="Claim">
+ <arg type="s" name="username" direction="in">
+ </arg>
+ </method>
+
+ <method name="Release">
+ </method>
+
+ <method name="VerifyStart">
+ <arg type="s" name="finger_name" direction="in">
+ </arg>
+ </method>
+
+ <method name="VerifyStop">
+ </method>
+
+ <signal name="VerifyFingerSelected">
+ <arg type="s" name="finger_name">
+ </arg>
+ </signal>
+
+ <signal name="VerifyStatus">
+ <arg type="s" name="result">
+ </arg>
+
+ <arg type="b" name="done">
+ </arg>
+
+ </signal>
+
+ <method name="EnrollStart">
+ <arg type="s" name="finger_name" direction="in">
+ </arg>
+ </method>
+
+ <method name="EnrollStop">
+ </method>
+
+ <signal name="EnrollStatus">
+ <arg type="s" name="result">
+ </arg>
+
+ <arg type="b" name="done">
+ </arg>
+ </signal>
+
+ <property name="name" type="s" access="read">
+ </property>
+
+ <property name="num-enroll-stages" type="i" access="read">
+ </property>
+
+ <property name="scan-type" type="s" access="read">
+ </property>
+
+ </interface>
+</node>
const FprintManagerIface = loadInterfaceXML('net.reactivated.Fprint.Manager');
const FprintManagerProxy = Gio.DBusProxy.makeProxyWrapper(FprintManagerIface);
+const FprintDeviceIface = loadInterfaceXML('net.reactivated.Fprint.Device');
+const FprintDeviceProxy = Gio.DBusProxy.makeProxyWrapper(FprintDeviceIface);
Gio._promisify(Gdm.Client.prototype,
'open_reauthentication_channel', 'open_reauthentication_channel_finish');
HINT: 3,
};
+const FingerprintReaderType = {
+ NONE: 0,
+ PRESS: 1,
+ SWIPE: 2,
+};
+
function fadeInActor(actor) {
if (actor.opacity == 255 && actor.visible)
return null;
}
_checkForFingerprintReader() {
- this._haveFingerprintReader = false;
+ this._fingerprintReaderType = FingerprintReaderType.NONE;
if (!this._settings.get_boolean(FINGERPRINT_AUTHENTICATION_KEY) ||
this._fprintManager == null) {
}
this._fprintManager.GetDefaultDeviceRemote(Gio.DBusCallFlags.NONE, this._cancellable,
- (device, error) => {
- if (!error && device) {
- this._haveFingerprintReader = true;
+ (params, error) => {
+ if (!error && params) {
+ const [device] = params;
+ const fprintDeviceProxy = new FprintDeviceProxy(Gio.DBus.system,
+ 'net.reactivated.Fprint',
+ device);
+ const fprintDeviceType = fprintDeviceProxy['scan-type'];
+
+ this._fingerprintReaderType = fprintDeviceType === 'swipe'
+ ? FingerprintReaderType.SWIPE
+ : FingerprintReaderType.PRESS;
this._updateDefaultService();
}
});
this._defaultService = PASSWORD_SERVICE_NAME;
else if (this._settings.get_boolean(SMARTCARD_AUTHENTICATION_KEY))
this._defaultService = SMARTCARD_SERVICE_NAME;
- else if (this._haveFingerprintReader)
+ else if (this._fingerprintReaderType !== FingerprintReaderType.NONE)
this._defaultService = FINGERPRINT_SERVICE_NAME;
if (!this._defaultService) {
_beginVerification() {
this._startService(this._getForegroundService());
- if (this._userName && this._haveFingerprintReader && !this.serviceIsForeground(FINGERPRINT_SERVICE_NAME))
+ if (this._userName &&
+ this._fingerprintReaderType !== FingerprintReaderType.NONE &&
+ !this.serviceIsForeground(FINGERPRINT_SERVICE_NAME))
this._startService(FINGERPRINT_SERVICE_NAME);
}
if (this.serviceIsForeground(serviceName)) {
this._queueMessage(info, MessageType.INFO);
} else if (serviceName == FINGERPRINT_SERVICE_NAME &&
- this._haveFingerprintReader) {
+ this._fingerprintReaderType !== FingerprintReaderType.NONE) {
// We don't show fingerprint messages directly since it's
// not the main auth service. Instead we use the messages
// as a cue to display our own message.
-
- // Translators: this message is shown below the password entry field
- // to indicate the user can swipe their finger instead
- this._queueMessage(_("(or swipe finger)"), MessageType.HINT);
+ if (this._fingerprintReaderType === FingerprintReaderType.SWIPE) {
+ // Translators: this message is shown below the password entry field
+ // to indicate the user can swipe their finger on the fingerprint reader
+ this._queueMessage(_('(or swipe finger across reader)'), MessageType.HINT);
+ } else {
+ // Translators: this message is shown below the password entry field
+ // to indicate the user can place their finger on the fingerprint reader instead
+ this._queueMessage(_('(or place finger on reader)'), MessageType.HINT);
+ }
}
}